﻿multilevelClick = function () {
    var hasClass = $(this).hasClass("dropdown-submenu-show");

    $('.dropdown-submenu.dropdown-submenu-show').removeClass('dropdown-submenu-show');
    if (!hasClass) {
        $(this).addClass('dropdown-submenu-show');
    }
    return false;
}

$(document).ready(function () {
    $('.dropdown-toggle').bind('click', function () {
        $('.dropdown-submenu.dropdown-submenu-show').removeClass('dropdown-submenu-show');
    });

    $('.dropdown-submenu').bind('click', multilevelClick);

    $('.dropdown-link').bind('click', function () {
        window.location.href = this;
    });
});